package com.gss.armory.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.validator.constraints.NotBlank;

@Entity
@Table(name="DOC_SUB_CATEGORY_DTLS")
public class DocumentSubCategory implements Serializable{
	
	private Integer dscId;
	
	@NotBlank
	private String dscName;
	@NotBlank
	private String dscCode;
	private DocumentCategoryDTO dscParentCategory;
		
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="DSC_ID")
	public Integer getDscId() {
		return dscId;
	}
	@Column(name="DSC_NAME",nullable=false,length=101)
	public String getDscName() {
		return dscName;
	}
	@Column(name="DSC_CODE",nullable=false,length=21)
	public String getDscCode() {
		return dscCode;
	}
	@ManyToOne
	@JoinColumn(name="DSC_PARENT_CAT",nullable=false)
	public DocumentCategoryDTO getDscParentCategory() {
		return dscParentCategory;
	}
	public void setDscId(Integer dscId) {
		this.dscId = dscId;
	}
	public void setDscName(String dscName) {
		this.dscName = dscName;
	}
	public void setDscParentCategory(DocumentCategoryDTO dscParentCategory) {
		this.dscParentCategory = dscParentCategory;
	}
	public void setDscCode(String dscCode) {
		this.dscCode = dscCode;
	}
	
}
